<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Print Test Date Announcement</title>

<#macro oral offering lang>
<tr>
	<td class="center">${offering.finalSpokenDate?string.full}</td>
	<td class="center w3">${offering.shift.startTime?string('HH:mm')} - ${offering.shift.endTime?string('HH:mm')}</td>
	<#if lang="en">
		<td class="center w3">Oral test</td>
	<#else>
		<td class="center w3">Thi nói</td>
	</#if>
</tr>
</#macro>

<#macro written offering lang>
<tr>
	<td class="center">${offering.finalWrittenDate?string.full}</td>
	<td class="center w3">${offering.shift.startTime?string('HH:mm')} - ${offering.shift.endTime?string('HH:mm')}</td>
	<#if lang="en">
		<td class="center w3">Written test</td>
	<#else>
		<td class="center w3">Thi nghe - đọc - viết</td>
	</#if>
</tr>
</#macro>
					
<#macro sortDate offering lang="en">
	<#if (offering.finalSpokenDate?date > offering.finalWrittenDate?date) >
		<@written offering lang/>
		<@oral offering lang/>
	<#else>
		<@oral offering lang/>
		<@written offering lang/>
	</#if>
</#macro>


<#macro written2 offering>
<tr>
	<td class="center">${(View.fullDateToVNString(offering.cambridgeWrittenDate))!}</td>
	<td class="center w3">${offering.shift.startTime?string('HH:mm')} - ${offering.shift.endTime?string('HH:mm')}</td>
	<td class="center w3">Thi Cambridge</td>
</tr>
</#macro>

<#macro oral2 offering>
<tr>
	<td class="center">${(View.fullDateToVNString(offering.finalWrittenDate))!}</td>
	<td class="center w3">${offering.shift.startTime?string('HH:mm')} - ${offering.shift.endTime?string('HH:mm')}</td>
	<td class="center w3">Thi nghe - đọc - viết</td>
</tr>
</#macro>

<#macro spoken2 offering>
<tr>
	<td class="center">${(View.fullDateToVNString(offering.finalSpokenDate))!}</td>
	<td class="center w3">${offering.shift.startTime?string('HH:mm')} - ${offering.shift.endTime?string('HH:mm')}</td>
	<td class="center w3">Thi nói</td>
</tr>
</#macro>
					
<#macro sortDate2 offering>
	<#if offering.cambridgeWrittenDate??>
		<#if (offering.cambridgeWrittenDate?date > offering.finalWrittenDate?date) && (offering.finalWrittenDate?date > offering.finalSpokenDate?date)>
			<@spoken2 offering />
			<@oral2 offering />
			<@written2 offering />
		<#elseif (offering.cambridgeWrittenDate?date > offering.finalSpokenDate?date) && (offering.finalSpokenDate?date > offering.finalWrittenDate?date)>
			<@oral2 offering />
			<@spoken2 offering />
			<@written2 offering />
		<#elseif (offering.finalWrittenDate?date > offering.cambridgeWrittenDate?date) && (offering.cambridgeWrittenDate?date > offering.finalSpokenDate?date)>
			<@spoken2 offering />
			<@written2 offering />
			<@oral2 offering />		
		<#elseif (offering.finalWrittenDate?date > offering.finalSpokenDate?date) && (offering.finalSpokenDate?date > offering.cambridgeWrittenDate?date)>
			<@written2 offering />
			<@spoken2 offering />
			<@oral2 offering />
		<#elseif (offering.finalSpokenDate?date > offering.cambridgeWrittenDate?date) && (offering.cambridgeWrittenDate?date > offering.finalWrittenDate?date)>
			<@oral2 offering />
			<@spoken2 offering />
			<@written2 offering />
		<#elseif (offering.finalSpokenDate?date > offering.finalWrittenDate?date) && (offering.finalWrittenDate?date > offering.cambridgeWrittenDate?date)>
			<@written2 offering />
			<@oral2 offering />
			<@spoken2 offering />
		</#if>
	<#else>
		<@sortDate offering "vi"/>
	</#if>
</#macro>

<link href="../styles/print.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	* { font-family: Arial, Helvetica, sans-serif; }
	
	#header { font-family: Arial; font-size: 10pt; }	
	.logo { float: left; text-align: center; margin: 0 0 0 10px; }
	.logo p { font-family: "times new roman"; font-size: 11pt; }
	.center { text-align: center; }
	.right { text-align: right; }
	.w3 { width: 33%; }
	.w100 { width: 130px; }
	.w150 { width: 200px; }
	.header-height { height: 130px; vertical-align: top; }
	
	#bodier { }
	#bodier * { font-family: "times new roman"; font-size: 14pt; } 
	#bodier .class-info p { padding: 4px 15px; line-height: 1.4em; }
	#bodier h1 { margin: 30px 0 5px; font-size: 38pt; }
	#bodier h2 { font-style: italic; font-size: 25px; }
	
	table.lists { border: 1px solid #000; border-collapse: collapse; }
	table.lists td { padding: 5px 3px; }
	table.lists th { padding: 8px 5px; }
</style>

</head>
<body>
<#if (offerings?size > 0)>
<#list offerings as offering>
	<#-- midterm announcement -->
	<#if (offering.midtermWrittenDate?? && offering.midtermWrittenDate >= fromDate?date) && (offering.midtermWrittenDate <= toDate?date)>
		<#-- vietnamese version -->
		<#if (offering.level.program.programType == 'PRE_CHILDREN' || offering.level.program.programType == 'CHILDREN')>
		<div class="pageA4">
			<table cellpadding="0" cellspacing="0" height="100%" width="100%"><tr><td class="header-height">
			<div id="header">
				<div class="logo">
					<img src="../images/logoSGTech.jpg" />
					<p>International English Language Program</p>
				</div>
				<br clear="left" />
			</div>
			</td></tr>
			<tr><td class="bodier-height">
			<div id="bodier">
				<h1 class="center">THÔNG BÁO</h1>
				<h2 class="center">V/v: Thi giữa khóa</h2>
				<div class="class-info"> 
					<p>Trung tâm Anh ngữ quốc tế SaigonTech xin thông báo lớp Anh văn Thiếu nhi (${offering.name!}) sẽ có buổi thi giữa khóa như sau:</p> 		
					<table width="95%" align="center" class="lists" border="1"><tr>
						<th>Ngày Thi</th>
						<th>Giờ Thi</th>
						<th>Môn Thi</th>
					</tr><tr>
						<td class="center">${(View.fullDateToVNString(offering.midtermWrittenDate))!}</td>
						<td class="center w3">${offering.shift.startTime?string('HH:mm')} - ${offering.shift.endTime?string('HH:mm')}</td>
						<td class="center w3">Thi nghe - đọc - viết</td>
					</tr></table>
					<p>Kỳ thi này là kỳ thi bắt buộc nhằm khảo sát và đánh giá quá trình học tập của các em. Điểm thi giữa khóa sẽ chiếm <strong>30%</strong> trong tổng điểm của toàn khóa học.</p>
					<p>Rất mong quý phụ huynh nhắc nhở các em ôn tập tốt cho kỳ thi.</p>
					<p><u>Mọi thắc mắc xin vui lòng liên hệ:</u><br />
					<em>Phòng Giáo vụ, Lầu 5, Tòa nhà Anna, CVPM Quang Trung, Quận 12, Tp.HCM</em><br />
					<em>Điện thoại: (08) 5437.1888 # số nội bộ: 312 – 313 – 314</em></p>
					<p>Trân trọng,</p>
					<p>PHÒNG GIÁO VỤ</p>
				</div>
			</div>
			</td></tr></table>
		</div>
		<#-- english version -->
		<#else>
		<div class="pageA4">
			<table cellpadding="0" cellspacing="0" height="100%" width="100%"><tr><td class="header-height">
			<div id="header">
				<div class="logo">
					<img src="../images/logoSGTech.jpg" />
					<p>International English Language Program</p>
				</div>
				<br clear="left" />
			</div>
			</td></tr>
			<tr><td class="bodier-height">
			<div id="bodier">
				<h1 class="center">ANNOUNCEMENT</h1>
				<h2 class="center">Re: Midterm test</h2>
				<div class="class-info">
					<p>Dear Students,</p> 
					<p>We would like to inform that your class (${offering.name!}) will have a midterm test as following:</p> 		
					<table width="95%" align="center" class="lists" border="1"><tr>
						<th>Date</th>
						<th>Time</th>
						<th>Subject</th>
					</tr><tr>
						<td class="center">${offering.midtermWrittenDate?string.full}</td>
						<td class="center w3">${offering.shift.startTime?string('HH:mm')} - ${offering.shift.endTime?string('HH:mm')}</td>
						<td class="center w3">Written test</td>
					</tr></table>
					<p>Please be noticed that the midterm test is a compulsory test, and its result occupies <strong>30%</strong> of your final result.</p>
					<p><u>If you need any assistance, please do not hesitate to contact us at:</u><br />
					<em>Registrar Office, 5th floor, Anna Building, Quang Trung Software City</em><br />
					<em>Telephone: (08) 5437.1888 # ext: 312 – 313 – 314</em></p>
					<p>Best Regards,</p>
					<p>The Registrar</p>
				</div>
			</div>
			</td></tr></table>
		</div>
		</#if>
	<#elseif (offering.finalWrittenDate?? && offering.finalWrittenDate >= fromDate?date) && (offering.finalWrittenDate <= toDate?date)>
		<#-- vietnamese version -->		
		<#if (offering.level.program.programType == 'PRE_CHILDREN' || offering.level.program.programType == 'CHILDREN')>
		<div class="pageA4">
			<table cellpadding="0" cellspacing="0" height="100%" width="100%"><tr><td class="header-height">
			<div id="header">
				<div class="logo">
					<img src="../images/logoSGTech.jpg" />
					<p>International English Language Program</p>
				</div>
				<br clear="left" />
			</div>
			</td></tr>
			<tr><td class="bodier-height">
			<div id="bodier">
				<h1 class="center">THÔNG BÁO</h1>
				<h2 class="center">V/v: Kết thúc cấp độ ${(offering.level.name)!}</h2>
				<div class="class-info"> 
					<p>Trung tâm Anh ngữ SaigonTech xin thông báo lớp Anh văn Thiếu nhi (${offering.name!}) sẽ có các buổi thi cuối khóa như sau:</p> 		
					<table width="95%" align="center" class="lists" border="1"><tr>
						<th>Ngày Thi</th>
						<th>Giờ Thi</th>
						<th>Môn Thi</th>
					</tr>
					<@sortDate2 offering />
					</table>
					<#assign nextOffering = offering.nextOffering>
					<p>Sau ${(View.dateToVNString(offering.endDate))!}, lớp các em sẽ được nghỉ trong vòng <em>${View.compareDate(offering.endDate?date, nextOffering.startDate?date)}</em> ngày để chờ khóa tiếp theo.<br/>
					Dưới đây là thông tin dự kiến về lớp kế tiếp:</p>
					
					<table width="95%" align="center"><tr>
						<td class="w100">Cấp độ</td>
						<td>: ${nextOffering.level.name}</td>
					</tr><tr>
						<td>Ngày khai giảng</td>
						<td>: ${nextOffering.startDate?string('dd/MM/yyyy')}</td>
					</tr><tr>
						<td>Thời gian</td>
						<td>: ${nextOffering.shift.startTime?string('HH:mm')} - ${offering.shift.endTime?string('HH:mm')}
							/ ${View.studyWeekDateVNString(nextOffering.startDate, 'vi')}</td>
					</tr><tr>
						<td>Thời lượng</td>
						<td>: ${nextOffering.level.weeks} tuần</td>
					</tr><tr>
						<td>Học phí</td>
						<td>: ${nextOffering.level.tuition.amount} USD</td>
					</tr></table>
					<p><u>Mọi thắc mắc xin vui lòng liên hệ:</u><br />
					<em>Phòng Giáo vụ, Lầu 5, Tòa nhà Anna, CVPM Quang Trung, Quận 12, Tp.HCM</em><br />
					<em>Điện thoại: (08) 5437.1888 # số nội bộ: 312 – 313 – 314</em></p>
					<p>Trân trọng,</p>
					<p>PHÒNG GIÁO VỤ</p>
				</div>
			</div>
			</td></tr></table>
		</div>
		<#-- english version -->
		<#else>
		<div class="pageA4">
			<table cellpadding="0" cellspacing="0" height="100%" width="100%"><tr><td class="header-height">
			<div id="header">
				<div class="logo">
					<img src="../images/logoSGTech.jpg" />
					<p>International English Language Program</p>
				</div>
				<br clear="left" />
			</div>
			</td></tr>
			<tr><td class="bodier-height">
			<div id="bodier">
				<h1 class="center">ANNOUNCEMENT</h1>
				<h2 class="center">Re: Final test</h2>
				<div class="class-info">
					<p>Dear Students,</p> 
					<p>We would like to inform that your present class (${offering.name!}) will have final test dates as followings:</p>
					<table width="95%" align="center" class="lists" border="1"><tr>
						<th>Date</th>
						<th>Time</th>
						<th>Subject</th>
					</tr>
					<@sortDate offering />
					</table>
					<#assign nextOffering = offering.nextOffering>
					<p>Your class will be off for <em>${View.compareDate(offering.endDate?date, nextOffering.startDate?date)}</em> days after ${offering.endDate?string.full} 
						until your next level. Below is the information about your next level:</p>
					
					<table width="95%" align="center"><tr>
						<td class="w100">Level</td>
						<td>: ${nextOffering.level.name}</td>
					</tr><tr>
						<td>Starting date</td>
						<td>: ${nextOffering.startDate?string.full}</td>
					</tr><tr>
						<td>Studying time</td>
						<td>: ${nextOffering.shift.startTime?string('HH:mm')} - ${offering.shift.endTime?string('HH:mm')}
							/ ${View.studyWeekDateVNString(nextOffering.startDate, 'en')}</td>
					</tr><tr>
						<td>Duration</td>
						<td>: ${nextOffering.level.weeks} weeks</td>
					</tr><tr>
						<td>Tuition</td>
						<td>: ${nextOffering.level.tuition.amount} USD</td>
					</tr></table>					
					<p><u>If you need any assistance, please do not hesitate to contact us at:</u><br />
					<em>Registrar Office, 5th floor, Anna Building, Quang Trung Software City</em><br />
					<em>Telephone: (08) 5437.1888 # ext: 312 – 313 – 314</em></p>
					<p>Best Regards,</p>
					<p>The Registrar</p>
				</div>
			</div>
			</td></tr></table>
		</div>
		</#if>
	<#else>
		Nothing to print
	</#if>
	<div class="page-break"></div>
</#list>
</#if>
</body>
</html>